#!/usr/bin/python3
# coding: utf-8
# ext.py
# 2018-07-11
from flask_httpauth import HTTPBasicAuth, HTTPDigestAuth
from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()
auth = HTTPBasicAuth()

users = {
	'john3': 'hello',
	'susan': 'bye',
}

@auth.get_password
def get_pw(username):
	if username in users:
		return users.get(username)
	return None